#ifnexists require

% Don't try to mess with evalfile()
message("require() not found; skipping test");

#else

require("gtk");
require("glade");

% Good topic
message("Help for _glade_module_doc_dir should be printed\n");
message(_get_glade_module_doc_string("_glade_module_doc_dir"));

% Bad topic
message("\nError should be printed saying help for BAD_TOPIC\n" +
  "couldn't be found\n");
message(_get_glade_module_doc_string("BAD_TOPIC"));

% Good topic, bad search path
putenv("SLGLADE_DOC_DIR=/bin");
message("\nError should be printed saying help for glade_xml_new()\n" +
  "couldn't be found in /bin\n");
message(_get_glade_module_doc_string("glade_xml_new"));

#endif

